{extend name="public:layout" /}
{block name="title"}添加{$moudleName}{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form" action="{:url('logic.query/infoRecord')}">
                <input class="form-control" type="hidden" name="mid" value="15" datatype="*" />
                <input class="form-control" type="hidden" placeholder="提交申请人" name="apply_uid" value="{$uid}" datatype="*" />
                <input class="form-control" type="hidden" name="car_id" value="{$Request.param.car_id}" datatype="*" />
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车牌号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" name="car_sn" value="{$Request.param.car_sn}" datatype="*" readonly/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">类别</label>
                    <div class="col-sm-3">
                        <label class="radio-inline i-checks">
                            <input type='radio' name="ser_type" value="0"/> 保养</label>
                        <label class="radio-inline i-checks"><input type='radio' name="ser_type" value="1" checked/> 维修</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">问题说明</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" placeholder="" name="title" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group" style="display:none;">
                    <label class="col-sm-2 control-label Validform_label">维修状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks"><input type='radio' name="service_status" value="0" checked/> 已提交</label>
                        <label class="radio-inline i-checks"><input type='radio' name="service_status" value="1" /> 开始处理</label>
                        <label class="radio-inline i-checks"><input type='radio' name="service_status" value="2" /> 处理完成</label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" id="btnSub" type="button">保存</button>
                        <a href="javascript:;" onclick="layer.closeAll()" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
    });
    In('validform','layer',function(){
        $("#form").Validform({
            btnSubmit:'#btnSub',
            ajaxPost: true,
            postonce: true,
            tipSweep: true,
            callback: function (data) {
                if(data.code==1){
                    top.layer.msg('维修申请已提交',{time:1000},function () {
                        top.layer.closeAll()
                    })
                }else{
                    top.layer.msg(data.msg);
                }
            }
        });
    })
</script>
{/block}